find_package(GTest REQUIRED)

include(CTest)
enable_testing()

file(GLOB SRCS *.cpp)
set(TEST_SOURCES ${TEST_SOURCES} ${SRCS})

set(TEST_TARGET unit-test)
add_executable(${TEST_TARGET} ${TEST_SOURCES})

set_target_properties(${TEST_TARGET} PROPERTIES
    CXX_STANDARD "17"
    CXX_STANDARD_REQUIRED "YES"
    CXX_EXTENSIONS "NO"
)

target_link_libraries(
  ${TEST_TARGET}
  ${LIB_TARGET_NAME}
  ${Boost_LIBRARIES}
  ${PCL_LIBRARIES}

  boost_thread boost_json
  pthread 
  gtest 
)
gtest_discover_tests(${TEST_TARGET})
# add_test(NAME UnitTestAll COMMAND ${TEST_TARGET})
